babl-cache: skip fishes with nonexistent conversions, instead of bailing
authorEll <ell_se@yahoo.com>
Sat, 4 Aug 2018 06:14:29 +0000 (02:14 -0400)
committerEll <ell_se@yahoo.com>
Sat, 4 Aug 2018 07:02:59 +0000 (03:02 -0400)
When encountering a nonexistent conversion while loading the fish
cache, skip the current fish, instead of stopping processing the
cache entirely.

babl/babl-cache.c

index 917f028d77da5b297f66ff7b14f7dc6069dee81c..e85216e649fc6ee26eed72b6a5e261d11c5205a2 100644 (file)
@@ -310,13 +310,13 @@ void babl_init_db (void)
               token2 = strtok_r (NULL, seps2, &tokp2);
             }
           }
-          else if (to_format)
+          else if (to_format && babl)
           {
             Babl *conv = (void*)babl_db_find(babl_conversion_db(), &token[1]);
             if (!conv)
             {
-              free (contents);
-              return;
+              babl_free (babl);
+              babl = NULL;
             }
             else
               babl_list_insert_last (babl->fish_path.conversion_list, conv);